

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.numpy.amax &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="mindspore.numpy.amin" href="mindspore.numpy.amin.html" />
    <link rel="prev" title="mindspore.numpy.add" href="mindspore.numpy.add.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.html">mindspore.dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../mindspore.numpy.html">mindspore.numpy</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#array-generation">Array Generation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#array-operation">Array Operation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mindspore.numpy.html#logic">Logic</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../mindspore.numpy.html#math">Math</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.absolute.html">mindspore.numpy.absolute</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.add.html">mindspore.numpy.add</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">mindspore.numpy.amax</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.amin.html">mindspore.numpy.amin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arccos.html">mindspore.numpy.arccos</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arccosh.html">mindspore.numpy.arccosh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arcsin.html">mindspore.numpy.arcsin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arcsinh.html">mindspore.numpy.arcsinh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arctan.html">mindspore.numpy.arctan</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arctan2.html">mindspore.numpy.arctan2</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.arctanh.html">mindspore.numpy.arctanh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.argmax.html">mindspore.numpy.argmax</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.argmin.html">mindspore.numpy.argmin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.around.html">mindspore.numpy.around</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.average.html">mindspore.numpy.average</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.bincount.html">mindspore.numpy.bincount</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.bitwise_and.html">mindspore.numpy.bitwise_and</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.bitwise_or.html">mindspore.numpy.bitwise_or</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.bitwise_xor.html">mindspore.numpy.bitwise_xor</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cbrt.html">mindspore.numpy.cbrt</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ceil.html">mindspore.numpy.ceil</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.clip.html">mindspore.numpy.clip</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.convolve.html">mindspore.numpy.convolve</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.copysign.html">mindspore.numpy.copysign</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.corrcoef.html">mindspore.numpy.corrcoef</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.correlate.html">mindspore.numpy.correlate</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cos.html">mindspore.numpy.cos</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cosh.html">mindspore.numpy.cosh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.count_nonzero.html">mindspore.numpy.count_nonzero</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cov.html">mindspore.numpy.cov</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cross.html">mindspore.numpy.cross</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cumprod.html">mindspore.numpy.cumprod</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.cumsum.html">mindspore.numpy.cumsum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.deg2rad.html">mindspore.numpy.deg2rad</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.diff.html">mindspore.numpy.diff</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.digitize.html">mindspore.numpy.digitize</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.divide.html">mindspore.numpy.divide</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.divmod.html">mindspore.numpy.divmod</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.dot.html">mindspore.numpy.dot</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ediff1d.html">mindspore.numpy.ediff1d</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.exp.html">mindspore.numpy.exp</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.exp2.html">mindspore.numpy.exp2</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.expm1.html">mindspore.numpy.expm1</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.fix.html">mindspore.numpy.fix</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.float_power.html">mindspore.numpy.float_power</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.floor.html">mindspore.numpy.floor</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.floor_divide.html">mindspore.numpy.floor_divide</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.fmod.html">mindspore.numpy.fmod</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.gcd.html">mindspore.numpy.gcd</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.gradient.html">mindspore.numpy.gradient</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.heaviside.html">mindspore.numpy.heaviside</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.histogram.html">mindspore.numpy.histogram</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.histogram2d.html">mindspore.numpy.histogram2d</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.histogramdd.html">mindspore.numpy.histogramdd</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.hypot.html">mindspore.numpy.hypot</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.inner.html">mindspore.numpy.inner</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.interp.html">mindspore.numpy.interp</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.invert.html">mindspore.numpy.invert</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.kron.html">mindspore.numpy.kron</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.lcm.html">mindspore.numpy.lcm</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.log.html">mindspore.numpy.log</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.log10.html">mindspore.numpy.log10</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.log1p.html">mindspore.numpy.log1p</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.log2.html">mindspore.numpy.log2</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logaddexp.html">mindspore.numpy.logaddexp</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.logaddexp2.html">mindspore.numpy.logaddexp2</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.matmul.html">mindspore.numpy.matmul</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.matrix_power.html">mindspore.numpy.matrix_power</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.maximum.html">mindspore.numpy.maximum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.mean.html">mindspore.numpy.mean</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.minimum.html">mindspore.numpy.minimum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.multi_dot.html">mindspore.numpy.multi_dot</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.multiply.html">mindspore.numpy.multiply</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nancumsum.html">mindspore.numpy.nancumsum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nanmax.html">mindspore.numpy.nanmax</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nanmean.html">mindspore.numpy.nanmean</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nanmin.html">mindspore.numpy.nanmin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nanstd.html">mindspore.numpy.nanstd</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nansum.html">mindspore.numpy.nansum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.nanvar.html">mindspore.numpy.nanvar</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.negative.html">mindspore.numpy.negative</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.norm.html">mindspore.numpy.norm</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.outer.html">mindspore.numpy.outer</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polyadd.html">mindspore.numpy.polyadd</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polyder.html">mindspore.numpy.polyder</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polyint.html">mindspore.numpy.polyint</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polymul.html">mindspore.numpy.polymul</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polysub.html">mindspore.numpy.polysub</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.polyval.html">mindspore.numpy.polyval</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.positive.html">mindspore.numpy.positive</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.power.html">mindspore.numpy.power</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.promote_types.html">mindspore.numpy.promote_types</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ptp.html">mindspore.numpy.ptp</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.rad2deg.html">mindspore.numpy.rad2deg</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.radians.html">mindspore.numpy.radians</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.ravel_multi_index.html">mindspore.numpy.ravel_multi_index</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.reciprocal.html">mindspore.numpy.reciprocal</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.remainder.html">mindspore.numpy.remainder</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.result_type.html">mindspore.numpy.result_type</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.rint.html">mindspore.numpy.rint</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.searchsorted.html">mindspore.numpy.searchsorted</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sign.html">mindspore.numpy.sign</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sin.html">mindspore.numpy.sin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sinh.html">mindspore.numpy.sinh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sqrt.html">mindspore.numpy.sqrt</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.square.html">mindspore.numpy.square</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.std.html">mindspore.numpy.std</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.subtract.html">mindspore.numpy.subtract</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.sum.html">mindspore.numpy.sum</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tan.html">mindspore.numpy.tan</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tanh.html">mindspore.numpy.tanh</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.tensordot.html">mindspore.numpy.tensordot</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.trapz.html">mindspore.numpy.trapz</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.true_divide.html">mindspore.numpy.true_divide</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.trunc.html">mindspore.numpy.trunc</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.unwrap.html">mindspore.numpy.unwrap</a></li>
<li class="toctree-l3"><a class="reference internal" href="mindspore.numpy.var.html">mindspore.numpy.var</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../mindspore.numpy.html">mindspore.numpy</a> &raquo;</li>
        
      <li>mindspore.numpy.amax</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/api_python/numpy/mindspore.numpy.amax.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="mindspore-numpy-amax">
<h1>mindspore.numpy.amax<a class="headerlink" href="#mindspore-numpy-amax" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="mindspore.numpy.amax">
<code class="sig-prename descclassname">mindspore.numpy.</code><code class="sig-name descname">amax</code><span class="sig-paren">(</span><em class="sig-param">a</em>, <em class="sig-param">axis=None</em>, <em class="sig-param">keepdims=False</em>, <em class="sig-param">initial=None</em>, <em class="sig-param">where=True</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/mindspore/numpy/math_ops.html#amax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mindspore.numpy.amax" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the maximum of an array or maximum along an axis.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Numpy argument <cite>out</cite> is not supported.
On GPU, the supported dtypes are np.float16, and np.float32.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>a</strong> (<a class="reference internal" href="../mindspore/mindspore.Tensor.html#mindspore.Tensor" title="mindspore.Tensor"><em>Tensor</em></a>) – Input data.</p></li>
<li><p><strong>axis</strong> (<a class="reference external" href="https://docs.python.org/library/constants.html#None" title="(in Python v3.8)"><em>None</em></a><em> or </em><a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a><em> or </em><em>tuple of integers</em><em>, </em><em>optional</em>) – Defaults to None. Axis or
axes along which to operate. By default, flattened input is used. If
this is a tuple of integers, the maximum is selected over multiple axes,
instead of a single axis or all the axes as before.</p></li>
<li><p><strong>keepdims</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Defaults to False.
If this is set to True, the axes which are reduced are left in the
result as dimensions with size one. With this option, the result will
broadcast correctly against the input array.</p></li>
<li><p><strong>initial</strong> (<em>scalar</em><em>, </em><em>optional</em>) – Defaults to None.
The minimum value of an output element. Must be present to allow
computation on empty slice.</p></li>
<li><p><strong>where</strong> (<em>boolean Tensor</em><em>, </em><em>optional</em>) – Defaults to True.
A boolean array which is broadcasted to match the dimensions of array,
and selects elements to include in the reduction. If non-default value
is passed, initial must also be provided.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Tensor or scalar, maximum of <cite>a</cite>. If <cite>axis</cite> is None, the result is a scalar
value. If <cite>axis</cite> is given, the result is an array of dimension <code class="docutils literal notranslate"><span class="pre">a.ndim</span> <span class="pre">-</span> <span class="pre">1</span></code>.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/library/exceptions.html#TypeError" title="(in Python v3.8)"><strong>TypeError</strong></a> – If the input is not a tensor.</p>
</dd>
</dl>
<dl class="simple">
<dt>Supported Platforms:</dt><dd><p><code class="docutils literal notranslate"><span class="pre">Ascend</span></code> <code class="docutils literal notranslate"><span class="pre">GPU</span></code> <code class="docutils literal notranslate"><span class="pre">CPU</span></code></p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">mindspore.numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s1">&#39;float32&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">output</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">amax</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
<span class="go">3.0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">output</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">amax</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
<span class="go">[2. 3.]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">output</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">amax</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
<span class="go">[1. 3.]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">output</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">amax</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">where</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">]),</span> <span class="n">initial</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">output</span><span class="p">)</span>
<span class="go">[-1.  3.]</span>
</pre></div>
</div>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="mindspore.numpy.amin.html" class="btn btn-neutral float-right" title="mindspore.numpy.amin" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="mindspore.numpy.add.html" class="btn btn-neutral float-left" title="mindspore.numpy.add" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>